Illumination systems are used in many applications. For example, they can be used in depth camera systems such as time-of-flight (TOF) cameras, lidar systems, and spectrometers. An illumination system includes a light source such as a laser or a light emitting diode (LED). Typically, additional optical or light processing elements such as lenses and mirrors are incorporated in the optical design of the illumination system. For example, these light processing elements can be used to direct the light of the light source to a target location or to spread the light over a target area. If the configuration of the optical elements is changed whether due to tampering or unintended damage, the illumination system does not work as intended for its optical design, and may cause a safety hazard.